﻿#region Using directives

using System;
using System.Data;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using NetROS.Tiers.Entities;
using NetROS.Tiers.Data;

#endregion

namespace NetROS.Tiers.Data.Bases
{	
	///<summary>
	/// This class is the base class for any <see cref="VwObracunZaRegosStavkeProviderBase"/> implementation.
	/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
	///</summary>
	public abstract class VwObracunZaRegosStavkeProviderBaseCore : EntityViewProviderBase<VwObracunZaRegosStavke>
	{
		#region Custom Methods
		
		
		#endregion

		#region Helper Functions
		
		/*
		///<summary>
		/// Fill an VList&lt;VwObracunZaRegosStavke&gt; From a DataSet
		///</summary>
		/// <param name="dataSet">the DataSet</param>
		/// <param name="rows">The collection to fill</param>
		/// <param name="start">Start row</param>
		/// <param name="pagelen">number of row.</param>
		///<returns><see chref="VList&lt;VwObracunZaRegosStavke&gt;"/></returns>
		protected static VList&lt;VwObracunZaRegosStavke&gt; Fill(DataSet dataSet, VList<VwObracunZaRegosStavke> rows, int start, int pagelen)
		{
			if (dataSet.Tables.Count == 1)
			{
				return Fill(dataSet.Tables[0], rows, start, pagelen);
			}
			else
			{
				return new VList<VwObracunZaRegosStavke>();
			}	
		}
		
		
		///<summary>
		/// Fill an VList&lt;VwObracunZaRegosStavke&gt; From a DataTable
		///</summary>
		/// <param name="dataTable">the DataTable that hold the data.</param>
		/// <param name="rows">The collection to fill</param>
		/// <param name="start">Start row</param>
		/// <param name="pagelen">number of row.</param>
		///<returns><see chref="VList<VwObracunZaRegosStavke>"/></returns>
		protected static VList&lt;VwObracunZaRegosStavke&gt; Fill(DataTable dataTable, VList<VwObracunZaRegosStavke> rows, int start, int pagelen)
		{
			int recordnum = 0;
			
			System.Collections.IEnumerator dataRows =  dataTable.Rows.GetEnumerator();
			
			while (dataRows.MoveNext() && (pagelen != 0))
			{
				if(recordnum >= start)
				{
					DataRow row = (DataRow)dataRows.Current;
				
					VwObracunZaRegosStavke c = new VwObracunZaRegosStavke();
					c.ID = (Convert.IsDBNull(row["ID"]))?(int)0:(System.Int32?)row["ID"];
					c.RedniBrojRetka = (Convert.IsDBNull(row["RedniBrojRetka"]))?(long)0:(System.Int64?)row["RedniBrojRetka"];
					c.RedniBrojStranice = (Convert.IsDBNull(row["RedniBrojStranice"]))?(long)0:(System.Int64?)row["RedniBrojStranice"];
					c.RedniBrojOsobeUObracunu = (Convert.IsDBNull(row["RedniBrojOsobeUObracunu"]))?(long)0:(System.Int64?)row["RedniBrojOsobeUObracunu"];
					c.OIB = (Convert.IsDBNull(row["OIB"]))?string.Empty:(System.String)row["OIB"];
					c.PunoIme = (Convert.IsDBNull(row["PunoIme"]))?string.Empty:(System.String)row["PunoIme"];
					c.SifraOpcineRegos = (Convert.IsDBNull(row["SifraOpcineRegos"]))?string.Empty:(System.String)row["SifraOpcineRegos"];
					c.IDObracunOsoba = (Convert.IsDBNull(row["IDObracunOsoba"]))?(int)0:(System.Int32?)row["IDObracunOsoba"];
					c.Sifra = (Convert.IsDBNull(row["Sifra"]))?string.Empty:(System.String)row["Sifra"];
					c.StazSPovecanimTrajanjem = (Convert.IsDBNull(row["StazSPovecanimTrajanjem"]))?string.Empty:(System.String)row["StazSPovecanimTrajanjem"];
					c.DatPocetak = (Convert.IsDBNull(row["datPocetak"]))?(int)0:(System.Int32?)row["datPocetak"];
					c.DatKraj = (Convert.IsDBNull(row["DatKraj"]))?(int)0:(System.Int32?)row["DatKraj"];
					c.Bruto = (Convert.IsDBNull(row["Bruto"]))?0:(System.Decimal?)row["Bruto"];
					c.OsnovicazaDoprinos = (Convert.IsDBNull(row["OsnovicazaDoprinos"]))?0:(System.Decimal?)row["OsnovicazaDoprinos"];
					c.MIO1 = (Convert.IsDBNull(row["MIO1"]))?0:(System.Decimal?)row["MIO1"];
					c.MIO2 = (Convert.IsDBNull(row["MIO2"]))?0:(System.Decimal?)row["MIO2"];
					c.SamoNetoIznos = (Convert.IsDBNull(row["SamoNetoIznos"]))?0:(System.Decimal?)row["SamoNetoIznos"];
					c.IBObveznika = (Convert.IsDBNull(row["IBObveznika"]))?string.Empty:(System.String)row["IBObveznika"];
					c.RedniBrojUGodini = (Convert.IsDBNull(row["RedniBrojUGodini"]))?(int)0:(System.Int32?)row["RedniBrojUGodini"];
					c.Godina = (Convert.IsDBNull(row["Godina"]))?(int)0:(System.Int32?)row["Godina"];
					c.RedniBrojStavkeUOsobiUObracunu = (Convert.IsDBNull(row["RedniBrojStavkeUOsobiUObracunu"]))?(long)0:(System.Int64?)row["RedniBrojStavkeUOsobiUObracunu"];
					c.AcceptChanges();
					rows.Add(c);
					pagelen -= 1;
				}
				recordnum += 1;
			}
			return rows;
		}
		*/	
						
		///<summary>
		/// Fill an <see cref="VList&lt;VwObracunZaRegosStavke&gt;"/> From a DataReader.
		///</summary>
		/// <param name="reader">Datareader</param>
		/// <param name="rows">The collection to fill</param>
		/// <param name="start">Start row</param>
		/// <param name="pageLength">number of row.</param>
		///<returns>a <see cref="VList&lt;VwObracunZaRegosStavke&gt;"/></returns>
		protected VList<VwObracunZaRegosStavke> Fill(IDataReader reader, VList<VwObracunZaRegosStavke> rows, int start, int pageLength)
		{
			int recordnum = 0;
			while (reader.Read() && (pageLength != 0))
			{
				if(recordnum >= start)
				{
					VwObracunZaRegosStavke entity = null;
					if (DataRepository.Provider.UseEntityFactory)
					{
						entity = EntityManager.CreateViewEntity<VwObracunZaRegosStavke>("VwObracunZaRegosStavke",  DataRepository.Provider.EntityCreationalFactoryType); 
					}
					else
					{
						entity = new VwObracunZaRegosStavke();
					}
					entity.ID = reader.IsDBNull(reader.GetOrdinal("ID")) ? null : (System.Int32?)reader["ID"];
					//entity.ID = (Convert.IsDBNull(reader["ID"]))?(int)0:(System.Int32?)reader["ID"];
					entity.RedniBrojRetka = reader.IsDBNull(reader.GetOrdinal("RedniBrojRetka")) ? null : (System.Int64?)reader["RedniBrojRetka"];
					//entity.RedniBrojRetka = (Convert.IsDBNull(reader["RedniBrojRetka"]))?(long)0:(System.Int64?)reader["RedniBrojRetka"];
					entity.RedniBrojStranice = reader.IsDBNull(reader.GetOrdinal("RedniBrojStranice")) ? null : (System.Int64?)reader["RedniBrojStranice"];
					//entity.RedniBrojStranice = (Convert.IsDBNull(reader["RedniBrojStranice"]))?(long)0:(System.Int64?)reader["RedniBrojStranice"];
					entity.RedniBrojOsobeUObracunu = reader.IsDBNull(reader.GetOrdinal("RedniBrojOsobeUObracunu")) ? null : (System.Int64?)reader["RedniBrojOsobeUObracunu"];
					//entity.RedniBrojOsobeUObracunu = (Convert.IsDBNull(reader["RedniBrojOsobeUObracunu"]))?(long)0:(System.Int64?)reader["RedniBrojOsobeUObracunu"];
					entity.OIB = reader.IsDBNull(reader.GetOrdinal("OIB")) ? null : (System.String)reader["OIB"];
					//entity.OIB = (Convert.IsDBNull(reader["OIB"]))?string.Empty:(System.String)reader["OIB"];
					entity.PunoIme = reader.IsDBNull(reader.GetOrdinal("PunoIme")) ? null : (System.String)reader["PunoIme"];
					//entity.PunoIme = (Convert.IsDBNull(reader["PunoIme"]))?string.Empty:(System.String)reader["PunoIme"];
					entity.SifraOpcineRegos = (System.String)reader["SifraOpcineRegos"];
					//entity.SifraOpcineRegos = (Convert.IsDBNull(reader["SifraOpcineRegos"]))?string.Empty:(System.String)reader["SifraOpcineRegos"];
					entity.IDObracunOsoba = reader.IsDBNull(reader.GetOrdinal("IDObracunOsoba")) ? null : (System.Int32?)reader["IDObracunOsoba"];
					//entity.IDObracunOsoba = (Convert.IsDBNull(reader["IDObracunOsoba"]))?(int)0:(System.Int32?)reader["IDObracunOsoba"];
					entity.Sifra = reader.IsDBNull(reader.GetOrdinal("Sifra")) ? null : (System.String)reader["Sifra"];
					//entity.Sifra = (Convert.IsDBNull(reader["Sifra"]))?string.Empty:(System.String)reader["Sifra"];
					entity.StazSPovecanimTrajanjem = reader.IsDBNull(reader.GetOrdinal("StazSPovecanimTrajanjem")) ? null : (System.String)reader["StazSPovecanimTrajanjem"];
					//entity.StazSPovecanimTrajanjem = (Convert.IsDBNull(reader["StazSPovecanimTrajanjem"]))?string.Empty:(System.String)reader["StazSPovecanimTrajanjem"];
					entity.DatPocetak = reader.IsDBNull(reader.GetOrdinal("datPocetak")) ? null : (System.Int32?)reader["datPocetak"];
					//entity.DatPocetak = (Convert.IsDBNull(reader["datPocetak"]))?(int)0:(System.Int32?)reader["datPocetak"];
					entity.DatKraj = reader.IsDBNull(reader.GetOrdinal("DatKraj")) ? null : (System.Int32?)reader["DatKraj"];
					//entity.DatKraj = (Convert.IsDBNull(reader["DatKraj"]))?(int)0:(System.Int32?)reader["DatKraj"];
					entity.Bruto = reader.IsDBNull(reader.GetOrdinal("Bruto")) ? null : (System.Decimal?)reader["Bruto"];
					//entity.Bruto = (Convert.IsDBNull(reader["Bruto"]))?0:(System.Decimal?)reader["Bruto"];
					entity.OsnovicazaDoprinos = reader.IsDBNull(reader.GetOrdinal("OsnovicazaDoprinos")) ? null : (System.Decimal?)reader["OsnovicazaDoprinos"];
					//entity.OsnovicazaDoprinos = (Convert.IsDBNull(reader["OsnovicazaDoprinos"]))?0:(System.Decimal?)reader["OsnovicazaDoprinos"];
					entity.MIO1 = reader.IsDBNull(reader.GetOrdinal("MIO1")) ? null : (System.Decimal?)reader["MIO1"];
					//entity.MIO1 = (Convert.IsDBNull(reader["MIO1"]))?0:(System.Decimal?)reader["MIO1"];
					entity.MIO2 = reader.IsDBNull(reader.GetOrdinal("MIO2")) ? null : (System.Decimal?)reader["MIO2"];
					//entity.MIO2 = (Convert.IsDBNull(reader["MIO2"]))?0:(System.Decimal?)reader["MIO2"];
					entity.SamoNetoIznos = reader.IsDBNull(reader.GetOrdinal("SamoNetoIznos")) ? null : (System.Decimal?)reader["SamoNetoIznos"];
					//entity.SamoNetoIznos = (Convert.IsDBNull(reader["SamoNetoIznos"]))?0:(System.Decimal?)reader["SamoNetoIznos"];
					entity.IBObveznika = reader.IsDBNull(reader.GetOrdinal("IBObveznika")) ? null : (System.String)reader["IBObveznika"];
					//entity.IBObveznika = (Convert.IsDBNull(reader["IBObveznika"]))?string.Empty:(System.String)reader["IBObveznika"];
					entity.RedniBrojUGodini = reader.IsDBNull(reader.GetOrdinal("RedniBrojUGodini")) ? null : (System.Int32?)reader["RedniBrojUGodini"];
					//entity.RedniBrojUGodini = (Convert.IsDBNull(reader["RedniBrojUGodini"]))?(int)0:(System.Int32?)reader["RedniBrojUGodini"];
					entity.Godina = reader.IsDBNull(reader.GetOrdinal("Godina")) ? null : (System.Int32?)reader["Godina"];
					//entity.Godina = (Convert.IsDBNull(reader["Godina"]))?(int)0:(System.Int32?)reader["Godina"];
					entity.RedniBrojStavkeUOsobiUObracunu = reader.IsDBNull(reader.GetOrdinal("RedniBrojStavkeUOsobiUObracunu")) ? null : (System.Int64?)reader["RedniBrojStavkeUOsobiUObracunu"];
					//entity.RedniBrojStavkeUOsobiUObracunu = (Convert.IsDBNull(reader["RedniBrojStavkeUOsobiUObracunu"]))?(long)0:(System.Int64?)reader["RedniBrojStavkeUOsobiUObracunu"];
					entity.AcceptChanges();
					rows.Add(entity);
					pageLength -= 1;
				}
				recordnum += 1;
			}
			return rows;
		}
		
		
		/// <summary>
		/// Refreshes the <see cref="VwObracunZaRegosStavke"/> object from the <see cref="IDataReader"/>.
		/// </summary>
		/// <param name="reader">The <see cref="IDataReader"/> to read from.</param>
		/// <param name="entity">The <see cref="VwObracunZaRegosStavke"/> object to refresh.</param>
		protected void RefreshEntity(IDataReader reader, VwObracunZaRegosStavke entity)
		{
			reader.Read();
			entity.ID = reader.IsDBNull(reader.GetOrdinal("ID")) ? null : (System.Int32?)reader["ID"];
			//entity.ID = (Convert.IsDBNull(reader["ID"]))?(int)0:(System.Int32?)reader["ID"];
			entity.RedniBrojRetka = reader.IsDBNull(reader.GetOrdinal("RedniBrojRetka")) ? null : (System.Int64?)reader["RedniBrojRetka"];
			//entity.RedniBrojRetka = (Convert.IsDBNull(reader["RedniBrojRetka"]))?(long)0:(System.Int64?)reader["RedniBrojRetka"];
			entity.RedniBrojStranice = reader.IsDBNull(reader.GetOrdinal("RedniBrojStranice")) ? null : (System.Int64?)reader["RedniBrojStranice"];
			//entity.RedniBrojStranice = (Convert.IsDBNull(reader["RedniBrojStranice"]))?(long)0:(System.Int64?)reader["RedniBrojStranice"];
			entity.RedniBrojOsobeUObracunu = reader.IsDBNull(reader.GetOrdinal("RedniBrojOsobeUObracunu")) ? null : (System.Int64?)reader["RedniBrojOsobeUObracunu"];
			//entity.RedniBrojOsobeUObracunu = (Convert.IsDBNull(reader["RedniBrojOsobeUObracunu"]))?(long)0:(System.Int64?)reader["RedniBrojOsobeUObracunu"];
			entity.OIB = reader.IsDBNull(reader.GetOrdinal("OIB")) ? null : (System.String)reader["OIB"];
			//entity.OIB = (Convert.IsDBNull(reader["OIB"]))?string.Empty:(System.String)reader["OIB"];
			entity.PunoIme = reader.IsDBNull(reader.GetOrdinal("PunoIme")) ? null : (System.String)reader["PunoIme"];
			//entity.PunoIme = (Convert.IsDBNull(reader["PunoIme"]))?string.Empty:(System.String)reader["PunoIme"];
			entity.SifraOpcineRegos = (System.String)reader["SifraOpcineRegos"];
			//entity.SifraOpcineRegos = (Convert.IsDBNull(reader["SifraOpcineRegos"]))?string.Empty:(System.String)reader["SifraOpcineRegos"];
			entity.IDObracunOsoba = reader.IsDBNull(reader.GetOrdinal("IDObracunOsoba")) ? null : (System.Int32?)reader["IDObracunOsoba"];
			//entity.IDObracunOsoba = (Convert.IsDBNull(reader["IDObracunOsoba"]))?(int)0:(System.Int32?)reader["IDObracunOsoba"];
			entity.Sifra = reader.IsDBNull(reader.GetOrdinal("Sifra")) ? null : (System.String)reader["Sifra"];
			//entity.Sifra = (Convert.IsDBNull(reader["Sifra"]))?string.Empty:(System.String)reader["Sifra"];
			entity.StazSPovecanimTrajanjem = reader.IsDBNull(reader.GetOrdinal("StazSPovecanimTrajanjem")) ? null : (System.String)reader["StazSPovecanimTrajanjem"];
			//entity.StazSPovecanimTrajanjem = (Convert.IsDBNull(reader["StazSPovecanimTrajanjem"]))?string.Empty:(System.String)reader["StazSPovecanimTrajanjem"];
			entity.DatPocetak = reader.IsDBNull(reader.GetOrdinal("datPocetak")) ? null : (System.Int32?)reader["datPocetak"];
			//entity.DatPocetak = (Convert.IsDBNull(reader["datPocetak"]))?(int)0:(System.Int32?)reader["datPocetak"];
			entity.DatKraj = reader.IsDBNull(reader.GetOrdinal("DatKraj")) ? null : (System.Int32?)reader["DatKraj"];
			//entity.DatKraj = (Convert.IsDBNull(reader["DatKraj"]))?(int)0:(System.Int32?)reader["DatKraj"];
			entity.Bruto = reader.IsDBNull(reader.GetOrdinal("Bruto")) ? null : (System.Decimal?)reader["Bruto"];
			//entity.Bruto = (Convert.IsDBNull(reader["Bruto"]))?0:(System.Decimal?)reader["Bruto"];
			entity.OsnovicazaDoprinos = reader.IsDBNull(reader.GetOrdinal("OsnovicazaDoprinos")) ? null : (System.Decimal?)reader["OsnovicazaDoprinos"];
			//entity.OsnovicazaDoprinos = (Convert.IsDBNull(reader["OsnovicazaDoprinos"]))?0:(System.Decimal?)reader["OsnovicazaDoprinos"];
			entity.MIO1 = reader.IsDBNull(reader.GetOrdinal("MIO1")) ? null : (System.Decimal?)reader["MIO1"];
			//entity.MIO1 = (Convert.IsDBNull(reader["MIO1"]))?0:(System.Decimal?)reader["MIO1"];
			entity.MIO2 = reader.IsDBNull(reader.GetOrdinal("MIO2")) ? null : (System.Decimal?)reader["MIO2"];
			//entity.MIO2 = (Convert.IsDBNull(reader["MIO2"]))?0:(System.Decimal?)reader["MIO2"];
			entity.SamoNetoIznos = reader.IsDBNull(reader.GetOrdinal("SamoNetoIznos")) ? null : (System.Decimal?)reader["SamoNetoIznos"];
			//entity.SamoNetoIznos = (Convert.IsDBNull(reader["SamoNetoIznos"]))?0:(System.Decimal?)reader["SamoNetoIznos"];
			entity.IBObveznika = reader.IsDBNull(reader.GetOrdinal("IBObveznika")) ? null : (System.String)reader["IBObveznika"];
			//entity.IBObveznika = (Convert.IsDBNull(reader["IBObveznika"]))?string.Empty:(System.String)reader["IBObveznika"];
			entity.RedniBrojUGodini = reader.IsDBNull(reader.GetOrdinal("RedniBrojUGodini")) ? null : (System.Int32?)reader["RedniBrojUGodini"];
			//entity.RedniBrojUGodini = (Convert.IsDBNull(reader["RedniBrojUGodini"]))?(int)0:(System.Int32?)reader["RedniBrojUGodini"];
			entity.Godina = reader.IsDBNull(reader.GetOrdinal("Godina")) ? null : (System.Int32?)reader["Godina"];
			//entity.Godina = (Convert.IsDBNull(reader["Godina"]))?(int)0:(System.Int32?)reader["Godina"];
			entity.RedniBrojStavkeUOsobiUObracunu = reader.IsDBNull(reader.GetOrdinal("RedniBrojStavkeUOsobiUObracunu")) ? null : (System.Int64?)reader["RedniBrojStavkeUOsobiUObracunu"];
			//entity.RedniBrojStavkeUOsobiUObracunu = (Convert.IsDBNull(reader["RedniBrojStavkeUOsobiUObracunu"]))?(long)0:(System.Int64?)reader["RedniBrojStavkeUOsobiUObracunu"];
			reader.Close();
	
			entity.AcceptChanges();
		}
		
		/*
		/// <summary>
		/// Refreshes the <see cref="VwObracunZaRegosStavke"/> object from the <see cref="DataSet"/>.
		/// </summary>
		/// <param name="dataSet">The <see cref="DataSet"/> to read from.</param>
		/// <param name="entity">The <see cref="VwObracunZaRegosStavke"/> object.</param>
		protected static void RefreshEntity(DataSet dataSet, VwObracunZaRegosStavke entity)
		{
			DataRow dataRow = dataSet.Tables[0].Rows[0];
			
			entity.ID = (Convert.IsDBNull(dataRow["ID"]))?(int)0:(System.Int32?)dataRow["ID"];
			entity.RedniBrojRetka = (Convert.IsDBNull(dataRow["RedniBrojRetka"]))?(long)0:(System.Int64?)dataRow["RedniBrojRetka"];
			entity.RedniBrojStranice = (Convert.IsDBNull(dataRow["RedniBrojStranice"]))?(long)0:(System.Int64?)dataRow["RedniBrojStranice"];
			entity.RedniBrojOsobeUObracunu = (Convert.IsDBNull(dataRow["RedniBrojOsobeUObracunu"]))?(long)0:(System.Int64?)dataRow["RedniBrojOsobeUObracunu"];
			entity.OIB = (Convert.IsDBNull(dataRow["OIB"]))?string.Empty:(System.String)dataRow["OIB"];
			entity.PunoIme = (Convert.IsDBNull(dataRow["PunoIme"]))?string.Empty:(System.String)dataRow["PunoIme"];
			entity.SifraOpcineRegos = (Convert.IsDBNull(dataRow["SifraOpcineRegos"]))?string.Empty:(System.String)dataRow["SifraOpcineRegos"];
			entity.IDObracunOsoba = (Convert.IsDBNull(dataRow["IDObracunOsoba"]))?(int)0:(System.Int32?)dataRow["IDObracunOsoba"];
			entity.Sifra = (Convert.IsDBNull(dataRow["Sifra"]))?string.Empty:(System.String)dataRow["Sifra"];
			entity.StazSPovecanimTrajanjem = (Convert.IsDBNull(dataRow["StazSPovecanimTrajanjem"]))?string.Empty:(System.String)dataRow["StazSPovecanimTrajanjem"];
			entity.DatPocetak = (Convert.IsDBNull(dataRow["datPocetak"]))?(int)0:(System.Int32?)dataRow["datPocetak"];
			entity.DatKraj = (Convert.IsDBNull(dataRow["DatKraj"]))?(int)0:(System.Int32?)dataRow["DatKraj"];
			entity.Bruto = (Convert.IsDBNull(dataRow["Bruto"]))?0:(System.Decimal?)dataRow["Bruto"];
			entity.OsnovicazaDoprinos = (Convert.IsDBNull(dataRow["OsnovicazaDoprinos"]))?0:(System.Decimal?)dataRow["OsnovicazaDoprinos"];
			entity.MIO1 = (Convert.IsDBNull(dataRow["MIO1"]))?0:(System.Decimal?)dataRow["MIO1"];
			entity.MIO2 = (Convert.IsDBNull(dataRow["MIO2"]))?0:(System.Decimal?)dataRow["MIO2"];
			entity.SamoNetoIznos = (Convert.IsDBNull(dataRow["SamoNetoIznos"]))?0:(System.Decimal?)dataRow["SamoNetoIznos"];
			entity.IBObveznika = (Convert.IsDBNull(dataRow["IBObveznika"]))?string.Empty:(System.String)dataRow["IBObveznika"];
			entity.RedniBrojUGodini = (Convert.IsDBNull(dataRow["RedniBrojUGodini"]))?(int)0:(System.Int32?)dataRow["RedniBrojUGodini"];
			entity.Godina = (Convert.IsDBNull(dataRow["Godina"]))?(int)0:(System.Int32?)dataRow["Godina"];
			entity.RedniBrojStavkeUOsobiUObracunu = (Convert.IsDBNull(dataRow["RedniBrojStavkeUOsobiUObracunu"]))?(long)0:(System.Int64?)dataRow["RedniBrojStavkeUOsobiUObracunu"];
			entity.AcceptChanges();
		}
		*/
			
		#endregion Helper Functions
	}//end class

	#region VwObracunZaRegosStavkeFilterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="VwObracunZaRegosStavke"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class VwObracunZaRegosStavkeFilterBuilder : SqlFilterBuilder<VwObracunZaRegosStavkeColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the VwObracunZaRegosStavkeFilterBuilder class.
		/// </summary>
		public VwObracunZaRegosStavkeFilterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the VwObracunZaRegosStavkeFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public VwObracunZaRegosStavkeFilterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the VwObracunZaRegosStavkeFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public VwObracunZaRegosStavkeFilterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion VwObracunZaRegosStavkeFilterBuilder

	#region VwObracunZaRegosStavkeParameterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ParameterizedSqlFilterBuilder&lt;EntityColumn&gt;"/> class
	/// that is used exclusively with a <see cref="VwObracunZaRegosStavke"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class VwObracunZaRegosStavkeParameterBuilder : ParameterizedSqlFilterBuilder<VwObracunZaRegosStavkeColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the VwObracunZaRegosStavkeParameterBuilder class.
		/// </summary>
		public VwObracunZaRegosStavkeParameterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the VwObracunZaRegosStavkeParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public VwObracunZaRegosStavkeParameterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the VwObracunZaRegosStavkeParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public VwObracunZaRegosStavkeParameterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion VwObracunZaRegosStavkeParameterBuilder
} // end namespace
